package com.telit.firecommand.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.telit.firecommand.dto.PlotRoomReturnDto;
import com.telit.firecommand.entity.CadPlotRoom;

import java.util.List;


/**
 * <p>
 * 标绘房间 服务类
 * </p>
 *
 * @author yummy
 * @since 2021-07-31
 */
public interface ICadPlotRoomService extends IService<CadPlotRoom> {

    /**
     * 查询标绘房间分页数据
     *
     * @param page      页码
     * @param pageCount 每页条数
     *
     * @return IPage<CadPlotRoom>
     */
    IPage<CadPlotRoom> findListByPage(CadPlotRoom cadPlotRoom, Integer page, Integer pageCount);

    List<CadPlotRoom> searchNoPage(CadPlotRoom cadPlotRoom);

    /**
     * 添加标绘房间
     *
     * @param cadPlotRoom 标绘房间
     *
     * @return int
     */
    int add(CadPlotRoom cadPlotRoom);

    /**
     * 删除标绘房间
     *
     * @param id 主键
     *
     * @return int
     */
    int delete(Integer id);

    /**
     * 批量删除标绘房间
     *
     * @param id 主键
     *
     * @return int[]
     */
    List<Integer> deleteBatch(Integer[] id);

    /**
     * 修改标绘房间
     *
     * @param cadPlotRoom 标绘房间
     *
     * @return int
     */
    int updateData(CadPlotRoom cadPlotRoom);

    /**
     * id查询数据
     *
     * @param id id
     *
     * @return CadPlotRoom
     */
    CadPlotRoom findById(Integer id);

    Integer searchCountByFireAlarmId(Long fireAlarmId, String status);

    PlotRoomReturnDto searchUserNameByFireAlarmId(String fireAlarmId);

    Boolean searchInRoomByFireAlarmIdAndUserId(String fireAlarmId, Long userId);

}
